Determine Whether Human Body Is Detected

  • Function:

    magicbox.is_pir_detected(port)
    
  • Description: determine whether human body is detected

  • Required parameter:

    • port: controller port. data type: int, range: 1~6
  • Return:
    • True: human body has been detected
    • False: human body has not been detected
  • Example

    res = magicbox.is_pir_detected(port=2)
    

    Detect the body sensor connected to Port 2 of controller, and determine whether human body is detected.

results matching ""

    No results matching ""